<div class="modal" id="addProductModal">
	<div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
          <h4 class="modal-title">Új termék felvétele</h4>
        </div>
		
        <div class="modal-body">
	        <form role="form" action="/smaragd/admin/addproduct" method="post" enctype="multipart/form-data">
				<div class="form-group">
				    <label for="productName">Termék neve</label>
				    <input type="text" name="name" class="form-control" id="productName" placeholder="Az új termék neve" required>
				</div>
		
				<div class="form-group">
				    <label for="productDescription">Termék leírása</label>
				    <textarea id="productDescription" name="description" class="form-control" rows="3" placeholder="Az új termék leírása ..." required></textarea>
				</div>
				
				<div class="form-group">
				    <label for="productPrice">Termék netto ára</label>
				    <div class="input-group">
				        <input type="text" class="form-control" name="netto_price" id="netto_price" placeholder="1000" required>
				        <span class="input-group-addon">netto Ft</span>
					</div>
				</div>
				
				<div class="form-group">
				    <label for="productPrice">Termék brutto ára</label>
				    <div class="input-group">
				        <input type="text" class="form-control" name="price" id="productPrice" placeholder="1270" required>
				        <span class="input-group-addon">brutto Ft</span>
					</div>
				</div>
				
				<div class="form-group">
				    <label for="productPrice">Haszon kulcs</label>
				    <div class="input-group">
				        <input type="text" class="form-control" name="profit_key" id="profit_key" placeholder="0%" required>
				        <span class="input-group-addon">0 %</span>
					</div>
				</div>
			
				<div class="form-group">
				    <label for="productPrice">Termék kategória</label>
				    <select class="form-control" name="category_id" required>
				    <?php
				        foreach( $products_model->getCategories() as $category)	{
				          echo '<option value="' . $category->id . '" data-name="' . $category->name  . '">' . $category->name . '</option>';						
				        }
				    ?>
				    </select>
				</div>
		
				<input name="id" style="display:none">
	            
	            <div class="form-group">
	                <label for="productImage">A termék képe</label>
	                <input type="file" class="form-control" name="userfile" id="productImage">
	            </div>
	            
	            <button id="formSubmit" type="submit" class="btn btn-default" style="display:none">Submit</button>  
			</form>
        </div>
		
        <div class="modal-footer">
          <a href="#" data-dismiss="modal" class="btn">Mégsem</a>
          <a href="#" class="btn btn-primary" onclick="$('#formSubmit').click();">Hozzáad</a>
        </div>
      </div>
    </div>
</div>